package com.lx.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lx.service.UserService;

@Controller
@RequestMapping("/user")
public class UserController {
	
	@Autowired
	private UserService service;
	
	@RequestMapping("/add")
	public String add(){
		service.saveUser();
		return "redirect:/index.jsp";
	}
	@RequestMapping("/show")
	public String show(){
		service.showUser();
		return "redirect:/index.jsp";
	}
}
